<?php

/*
 * File name : dbconnection.php
 * Description : Checks if the user already exists. If not creates the login account.
 * Created By : Pratibha Awasthi.
 */

class dbconnection{
	
	// Establishes a database connection
	private $con;	
	public function dbconnect($username,$password){
	
			$con = __construct('localhost',$username,$password);
			if (!$con){
		  		die('Could not connect: ' . mysql_error());
		  	}
		  
			mysql_select_db("TGS_GM_RESERVATION", $con);
	}
	
	// Closes the database connection
	public function dbclose(){
			mysql_close($con);
	}
}
?>